<?php 
namespace app\model;
use think\Model;
use think\Db;

class Category extends Model
{	
    public static function getStatusCn($key){
        $list = [1=>'显示',0=>'隐藏'];
        return $list[$key];
    }

    public static function getStatusList(){
        $list = [1=>'显示',0=>'隐藏'];
        return $list;
    }

    public static function getModuleCn($key){
        $list = ['头部导航','底部导航','首页阿里云产品模块','新闻动态','首页一站式解决方案模块'];
        return $list[$key];
    }

    public static function getModuleList(){
        $list = ['头部导航','底部导航','首页阿里云产品模块','新闻动态','首页一站式解决方案模块'];
        return $list;
    }

    public static function getTypeCn($key){
        $list = ['详情内容','文章列表'];
        return $list[$key];
    }

    public static function getTypeList(){
        $list = ['详情内容','文章列表'];
        return $list;
    }

    public static function getAttributeCn($key){
        $list = [1=>'头部导航',2=>'推荐',3=>'底部导航'];
        $name = [];
        $keys = explode(',', $key);
        foreach ($keys as $vo) {
            if (!empty($vo)) {
                $name[] = $list[$vo];
            }
        }
        
        return implode(',',$name);
    }

    public static function getAttributeList(){
        $list = [1=>'头部导航',2=>'推荐',3=>'底部导航'];
        return $list;
    }
}


 ?>